import pysolr



if __name__ == '__main__':
    zookeeper = pysolr.ZooKeeper("CDH-master:2181,CDH-slave1:2181,CDH-slave2:2181/solr")
    solr_con =  pysolr.SolrCloud(zookeeper,"hbaseSolr")
    # 删除一个
    #solr_con.delete(id='row998')

    # 删除列表
    solr_con.delete(id=['row997', 'row996'])

    # 删除一个查询的所有数据
    #solr_con.delete(q='*:*')
    print('删除成功！')